package com.gluxen.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import com.gluxen.common.constant.SystemConstant;

/**
 *订单表
 */
@Entity
@Table(name = "ORDER_FORM")
public class OrderForm  extends BaseEntity{
	/** 订单主键*/
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name = "PK_USER_ROLE_REF_ID")
	private Integer id;

	/**用户外键 */
	@ManyToOne(cascade = CascadeType.REFRESH)
	@JoinColumn(name = "FK_USER_ID")
	private User user;
	
	/** 礼品外键*/
	@ManyToOne(cascade = CascadeType.REFRESH)
	@JoinColumn(name = "FK_GIFT_ID")
	private  Gift gift;
	
	/**创建日期*/
	@Column(name = "GET_DATE")
	@DateTimeFormat(pattern=SystemConstant.TIME_PATTEN)
	private Date getDate = new Date();
	
	/** 数量*/
    @Column(name = "AMOUNT", length = 10)
	 private Integer amount=0;
    
    /**处理状态 */
    @Column(name = "STATUS", length = 10)
	 private Integer status=0;

    
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Gift getGift() {
		return gift;
	}

	public void setGift(Gift gift) {
		this.gift = gift;
	}

	public Date getGetDate() {
		return getDate;
	}

	public void setGetDate(Date getDate) {
		this.getDate = getDate;
	}

	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}
    
    
}
